<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- <iframe src="http://127.0.0.1:8990/?path=timeOrder" style="height: 100vh;width: 100%;" frameborder="0"></iframe> -->
    
    <script>

        let a = [2, 7, 11, 15]
        let b = 9

        let x = 0;
        let y = 1;
        for (; y < a.length;) {
            if (a[x] + a[y] == b) {
                break;
            }
            if (x == a.length - 1) {
                y++
                x = y + 1
            } else {
                x++
            }
        }
        console.log([x, y]);

`
class Test{
	public int main(int a){
	    int sum = 1;
	    for (int i = 1;i <= a; i++){
	        sum *= i;
	    }
	    return sum
	}
}
`

    </script>

</body>

</html>